print "Enter a Value:"

first_num = gets.to_i

print "Enter Anither Value:"

second_num = gets.to_i

puts first_num.to_s + "+" + second_num.to_s + "=" + (first_num + second_num).to_s

#Arithmetic Operators
puts "6+4=" + (6 + 4).to_s
puts "6-4=" + (6 - 4).to_s
puts "6*4=" + (6 * 4).to_s
puts "6/4=" + (6 / 4).to_s
puts "6%4=" + (6 % 4).to_s

# DataError
num_one = 1.000
num99 = 0.999

puts num_one.to_s + "+" + num99.to_s + "=" + (num_one - num99).to_s

# DataType
puts 1.class
puts 1.123.class
puts "A String".class

# 常量
A_CONSTANT = 31.4   # 全局常量
# A_CONSTANT = 1.4
module Samp
  B_CONSTANT = 31.4 # 局部常量
  B_CONSTANT = 1.4  # 局部常量
end

puts A_CONSTANT
puts Samp::B_CONSTANT